package com.example.service.impl;

import com.example.dao.StudentDao;
import com.example.dao.impl.StudentDaoImpl;
import com.example.domain.Student;
import com.example.service.StudentService;

import java.util.List;

/**
 * @program: sms
 * @description:
 * @author: zhanghz001
 * @create: 2020-11-08 20:13
 **/
public class StudentServiceImpl implements StudentService {
    private StudentDao studentDao = new StudentDaoImpl();

    @Override
    public List<Student> findAll() {
        return studentDao.findAll();
    }

    @Override
    public Student findById(Integer id) {
        return studentDao.findById(id);
    }

    @Override
    public int insert(Student stu) {
        return studentDao.insert(stu);
    }

    @Override
    public int update(Student stu) {
        return studentDao.update(stu);
    }

    @Override
    public int delete(Integer i) {
        return studentDao.delete(i);
    }
}
